package com.tsinghua.discharge.dao;

import com.tsinghua.discharge.model.FileUploadRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FileUploadRecordMapper {
    int deleteByPrimaryKey(Integer recordId);

    int insert(FileUploadRecord record);

    int insertSelective(FileUploadRecord record);

    FileUploadRecord selectByPrimaryKey(Integer recordId);

    int updateByPrimaryKeySelective(FileUploadRecord record);

    int updateByPrimaryKey(FileUploadRecord record);

    List<FileUploadRecord> selectRecordList(@Param("userId") Integer userId, @Param("fileType") String fileType);

    List<FileUploadRecord> selectRecordBySector(@Param("userId") Integer userId, @Param("fileType") String fileType,@Param("sector") String sector);

    int deleteByFileTypeAndSector(@Param("fileType") String fileType,@Param("supSector") String supSector,@Param("userId") Integer userId);

    List<FileUploadRecord> selectRecordByFileTypeAndSector(@Param("fileType") String fileType,@Param("supSector") String supSector,@Param("userId") Integer userId );
}